import 'package:flutter/material.dart';
import '../../../utils/G.dart';
import 'product_spec_dialog.dart';

class ProductBottomMenu extends StatelessWidget {
  const ProductBottomMenu({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Row(
        children: [
          InkWell(
            onTap: () {
              // 点击后，弹出规格选择窗口
              getProductSpecDialog(context);
            },
            child: Container(
                width: G.width / 2,
                height: 50,
                color: Colors.green,
                alignment: Alignment.center,
                child: const Text(
                  '加入购物车',
                  style: TextStyle(color: Colors.white, fontSize: 22),
                )),
          ),
          InkWell(
            onTap: () {
              // 点击后，弹出规格选择窗口
              getProductSpecDialog(context);
            },
            child: Container(
                width: G.width / 2,
                height: 50,
                color: Theme.of(context).primaryColor,
                alignment: Alignment.center,
                child: const Text(
                  '立即购买',
                  style: TextStyle(color: Colors.white, fontSize: 22),
                )),
          )
        ],
      ),
    );
  }
}
